<?php $this->load->view('admin/public/head.html', array(
    'css' => array('/assets/admin/css/admin/common.css')
)); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper systemSetting" ng-controller="admin-wx-setting">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            分销管理
            <small>微信分销系统设置</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/home"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">分销设置</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <!-- Your Page Content Here -->
        <div class="row">
            <!-- right column -->
            <div class="col-md-12">
                <!-- Horizontal Form -->
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">分销设置</h3>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="level-1" class="col-sm-2 control-label">一级分销提成比例</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" id="level-1" ng-model="scale.level_1" placeholder="提成比例">
                                    <p class="help-block">请将提成比例转化为小数,如千分之五,表示为:0.005</p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="level-2" class="col-sm-2 control-label">二级分销提成比例</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" id="level-2" ng-model="scale.level_2" placeholder="提成比例">
                                    <p class="help-block">请将提成比例转化为小数,如千分之五,表示为:0.005</p>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <button type="submit" class="btn btn-default">取消</button>
                            <button type="submit" class="btn btn-info pull-right" ng-click="save()">保存</button>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
                <!-- /.box -->
            </div>
            <!--/.col (right) -->
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">推广二维码设置</h3>
                    </div>

                    <form class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">海报背景</label>
                                <div class="col-sm-8">
                                    <div class="row">
                                        <div class="col-sm-12" ng-if="showBillImageUrl">
                                            <div class="thumb-adv-box">
                                                <img ng-src="{{ showBillImageUrl }}" class="thumb-adv" alt="">
                                            </div>
                                        </div>
                                        <div class="col-sm-12">
                                            <button id="billBtn" class="btn btn-info pull-left" style="margin-top: 5px;">选择图片</button>
                                            <div class="thumb-logo-text pull-left">
                                                生成微信用户推广海报
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="level-1" class="col-sm-2 control-label">起始坐标（X,Y）</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" id="bill-x" ng-model="bill.local.x" placeholder="X坐标位置">
                                </div>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" id="bill-y" ng-model="bill.local.y" placeholder="Y坐标位置">
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="level-2" class="col-sm-2 control-label">二维码尺寸（长,宽）</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" id="bill-w" ng-model="bill.size.width" placeholder="二维码宽度">
                                </div>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" id="bill-h" ng-model="bill.size.height" placeholder="二维码高度">
                                </div>
                            </div>
                        </div>
                    </form>
                    <div class="box-footer">
                        <button type="submit" class="btn btn-default">取消</button>
                        <button type="submit" class="btn btn-info pull-right" ng-click="saveBill()">保存</button>
                    </div>
                </div>
            </div>
        </div>

    </section>
    <!-- /.content -->
</div>

<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array('js' => array(
    'http://cdn.staticfile.org/webuploader/0.1.0/webuploader.flashonly.min.js',
    '/assets/admin/js/system/wx.js'
))); ?>
